package com.alvinlkk.basic.chapter21;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

//相当于线程数量为1的FixThreadPool
public class SingleThreadExecutor {
    public static void main(String[] args) {
        ExecutorService exec = Executors.newSingleThreadExecutor();
        for(int i=0; i<5; i++) {
            exec.execute(new LiftOff());
        }
        exec.shutdown();
    }
}
